package io.renren.modules.bindinfo.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.bindinfo.dao.BindinfoDao;
import io.renren.modules.bindinfo.entity.BindinfoEntity;
import io.renren.modules.bindinfo.service.BindinfoService;


@Service("bindinfoService")
public class BindinfoServiceImpl extends ServiceImpl<BindinfoDao, BindinfoEntity> implements BindinfoService {

    @Autowired
    BindinfoDao bindinfoDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BindinfoEntity> page = this.page(
                new Query<BindinfoEntity>().getPage(params),
                new QueryWrapper<BindinfoEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<BindinfoEntity> getbindinfo(String wmId, String normId) {
        return bindinfoDao.getbindinfo(wmId,normId);
    }

    @Override
    public int insertItem(String wmId, String normId, String startTime, String endTime) {
        return bindinfoDao.insertItem(wmId,normId,startTime,endTime);
    }


}